import { createApp } from 'vue'
// import { registerApp } from './global/index'
import 'normalize.css'
import './assets/css/index.less'
import App from './App.vue'
import router from './router'
import store from './store'
// import HyRequest from './service'
import { setupStore } from './store'

const app = createApp(App)

import ElementPlus from 'element-plus'
import 'element-plus/lib/theme-chalk/index.css'

// registerApp(app)
app.use(ElementPlus)
app.use(store)
setupStore() //先拿到菜单 然后再去路由匹配才不会出现404
app.use(router)
app.mount('#app')
// interface DataType {
//   data: any
//   returnCode: string
//   success: boolean
// }

// HyRequest.request({
//   url: '/comment/list/1',
//   method: 'GET',
//   showLoading: false,
//   interceptors: {
//     requestInterceptor: (config) => {
//       console.log('单个请求拦截')
//       return config
//     },
//   },
// })
